{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 256,
   "id": "77e67ffe",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: http://mirrors.aliyun.com/pypi/simple/\n",
      "Collecting textfsm\n",
      "  Downloading http://mirrors.aliyun.com/pypi/packages/f8/f2/235703136dc9f25d1498c0f0b49ed99a4d7f98c361f322a5da586eb1ee06/textfsm-1.1.3-py2.py3-none-any.whl (44 kB)\n",
      "     -------------------------------------- 44.7/44.7 kB 200.1 kB/s eta 0:00:00\n",
      "Collecting future\n",
      "  Downloading http://mirrors.aliyun.com/pypi/packages/8f/2e/cf6accf7415237d6faeeebdc7832023c90e0282aa16fd3263db0eb4715ec/future-0.18.3.tar.gz (840 kB)\n",
      "     ------------------------------------ 840.9/840.9 kB 209.3 kB/s eta 0:00:00\n",
      "  Preparing metadata (setup.py): started\n",
      "  Preparing metadata (setup.py): finished with status 'done'\n",
      "Requirement already satisfied: six in d:\\program files (x86)\\thonny\\lib\\site-packages (from textfsm) (1.16.0)\n",
      "Building wheels for collected packages: future\n",
      "  Building wheel for future (setup.py): started\n",
      "  Building wheel for future (setup.py): finished with status 'done'\n",
      "  Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492055 sha256=463ec9aeaa9b4fead206f53f0423663c5db85d87acb7574899f5573fa64bdbd0\n",
      "  Stored in directory: c:\\users\\administrator\\appdata\\local\\pip\\cache\\wheels\\6e\\54\\16\\2ab500319d13efeeee4b2007aab5a01589dc775fb1a1f617c5\n",
      "Successfully built future\n",
      "Installing collected packages: future, textfsm\n",
      "Successfully installed future-0.18.3 textfsm-1.1.3\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  WARNING: The scripts futurize.exe and pasteurize.exe are installed in 'D:\\Program Files (x86)\\Thonny\\Scripts' which is not on PATH.\n",
      "  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n",
      "  WARNING: The script textfsm.exe is installed in 'D:\\Program Files (x86)\\Thonny\\Scripts' which is not on PATH.\n",
      "  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n",
      "\n",
      "[notice] A new release of pip available: 22.3.1 -> 23.0.1\n",
      "[notice] To update, run: python.exe -m pip install --upgrade pip\n"
     ]
    }
   ],
   "source": [
    "pip install textfsm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "8b25e382",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n",
    "import telnetlib\n",
    "from textfsm import TextFSM\n",
    "import re,json\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9e002723",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "8ae9e5d7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'交换机列表': [{'type': 'hws3700',\n",
       "   'ip': '192.168.11.1',\n",
       "   'user': 'admin',\n",
       "   'passwd': 'wsf2010'},\n",
       "  {'type': 'hws3700',\n",
       "   'ip': '192.168.11.200',\n",
       "   'user': '',\n",
       "   'passwd': 'wsf2010'}],\n",
       " '输出路径': './'}"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def readCfg(filename):\n",
    "    \"\"\"读取配置文件\"\"\"\n",
    "    # 读取json文件内容,返回字典格式\n",
    "    json_data = {}\n",
    "    with open(filename,'r',encoding='utf8')as fp:\n",
    "        json_data = json.load(fp)\n",
    "    return json_data\n",
    "cfg = readCfg('sw_config.json')\n",
    "cfg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "380c7ac4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "b'\\r\\r\\n\\r\\nLogin authentication\\r\\n\\r\\n\\r\\nUsername:'"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "host='192.168.11.1'\n",
    "\n",
    "user='admin'\n",
    "password1='wsf2010'\n",
    "\n",
    " \n",
    "tn=telnetlib.Telnet(host)\n",
    "tn.read_until(b\"Username:\")\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "3d7ef1ba",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n",
    "\n",
    "def hwlogin(user,passwd,ip):\n",
    "    \"\"\"登入交换机 返回telnet\"\"\"\n",
    "    tn=telnetlib.Telnet(host)\n",
    "    out = tn.read_until(b\"Username:\",timeout=5)\n",
    "    tn.write(user.encode('ascii')+b\"\\n\")\n",
    "    out = tn.read_until(b\"Password:\",timeout=5)\n",
    "    tn.write(passwd.encode('ascii')+b\"\\n\")\n",
    "    outLs = tn.expect([b\"\\r\\n<.+?>\"],timeout=5)##等待直到读到预期的值\n",
    "    print(outLs[2])\n",
    "    return tn\n",
    "\n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "e73a5e58",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "b'\\r\\nInfo: The max number of VTY users is 5, and the number\\r\\n      of current VTY users on line is 3.\\r\\n<3700>'\n"
     ]
    }
   ],
   "source": [
    "tn = hwlogin(user,password1,host)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "386d5c13",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n",
    "def readMore():\n",
    "    \"\"\" 读取更多 \"\"\"\n",
    "    pass\n",
    "def list2str(tabLs):\n",
    "    tabStr = ''.join(tabLs)\n",
    "    tabStr =  re.sub(\"\\s+---- More ----\\x1b\\[42D\\s+\\x1b\\[42D\", \"\\r\\n\", tabStr)\n",
    "    tabStr =  re.sub(\"\\r\\n\\s{30,}\",\"  \", tabStr)   \n",
    "    return tabStr\n",
    "def hwArpTab(tn):\n",
    "    \"\"\" 返回交换 arp表\"\"\"\n",
    "    tabLs = []\n",
    "    tn.write(b\"display arp\\n\")\n",
    "    while 1 :\n",
    "        outLs = tn.expect([b\"\\r\\n<.+?>\",b\"---- More ----\"],timeout=5) \n",
    "        if outLs[0] == 1:\n",
    "            #还有下一个页\n",
    "            tn.write(b\"   \")\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            #print(outLs[2])\n",
    "        if outLs[0] <= 0:\n",
    "            # 完成读取\n",
    "            #print(outLs[2])\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            break\n",
    " \n",
    "    return tabLs\n",
    "tabLs = hwArpTab(tn)\n",
    "tabStr = list2str(tabLs)                          \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "2ddedef8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "display arp\r\n",
      "IP ADDRESS      MAC ADDRESS  EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE         VLAN \r\n",
      "------------------------------------------------------------------------------\r\n",
      "192.168.11.1    80fb-06c9-6db9         I -  Vlanif11\r\n",
      "192.168.11.199  b42e-9968-4090  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.30   4419-b641-7795  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.189  0800-2740-3822  9      D-0  Eth0/0/1  11\r\n",
      "192.168.12.1    80fb-06c9-6db9         I -  Vlanif12\r\n",
      "192.168.13.1    80fb-06c9-6db9         I -  Vlanif13\r\n",
      "192.168.14.1    80fb-06c9-6db9         I -  Vlanif14\r\n",
      "192.168.14.13   8269-c0e2-cbe1  4      D-0  Eth0/0/11  14\r\n",
      "192.168.15.1    80fb-06c9-6db9         I -  Vlanif15\r\n",
      "192.168.15.254  8ca6-df43-6b43  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.33   7427-eae8-fef9  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.177  4ced-fb6c-ef9f  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.200  408d-5c8f-2aca  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.88   b42e-99e6-3c49  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.63   4ced-fb41-fba5  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.231  b42e-999d-1f99  1      D-0  Eth0/0/5  15\r\n",
      "192.168.15.136  70b5-e874-5732  7      D-0  Eth0/0/5  15\r\n",
      "192.168.16.1    80fb-06c9-6db9         I -  Vlanif16\r\n",
      "192.168.17.1    80fb-06c9-6db9         I -  Vlanif17\r\n",
      "192.168.17.151  4cf5-dc97-35a9  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.23   4cf5-dc97-3695  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.11   4cf5-dc97-3677  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.172  4cf5-dc97-3421  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.152  acb9-2f46-05f5  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.249  849a-4059-b273  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.4    4cf5-dc97-36b4  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.150  44a6-42b6-c0a3  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.38   e0d5-5e56-7edb  6      D-0  Eth0/0/7  17\r\n",
      "192.168.17.55   b42e-9979-de61  18     D-0  Eth0/0/7  17\r\n",
      "192.168.17.54   00e0-4c52-032d  18     D-0  Eth0/0/7  17\r\n",
      "192.168.18.1    80fb-06c9-6db9         I -  Vlanif18\r\n",
      "192.168.19.1    80fb-06c9-6db9         I -  Vlanif19\r\n",
      "192.168.20.1    80fb-06c9-6db9         I -  Vlanif20\r\n",
      "192.168.20.3    4cf5-dc9a-c39e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.188  807c-62bb-4e1e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.2    4cf5-dc97-3471  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.85   f46d-2fcf-c3ed  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.200  0020-6ba3-4d7c  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.64   2428-fdc1-76e4  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.135  e0d5-5ef7-0e13  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.136  f079-596c-908a  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.182  408d-5c1d-9e3e  13     D-0  Eth0/0/9  20\r\n",
      "192.168.20.74   d45d-6439-a7a3  7      D-0  Eth0/0/9  20\r\n",
      "192.168.20.66   0c9d-920f-c668  8      D-0  Eth0/0/11  20\r\n",
      "192.168.20.116  00e0-4c57-9160  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.134  e86a-642e-0446  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.101  a85e-45a0-0ace  12     D-0  Eth0/0/9  20\r\n",
      "192.168.20.198  309c-23b9-101a  16     D-0  Eth0/0/9  20\r\n",
      "192.168.21.1    80fb-06c9-6db9         I -  Vlanif21\r\n",
      "192.168.22.1    80fb-06c9-6db9         I -  Vlanif22\r\n",
      "192.168.24.1    80fb-06c9-6db9         I -  Vlanif24\r\n",
      "192.168.25.1    80fb-06c9-6db9         I -  Vlanif25\r\n",
      "192.168.6.1     80fb-06c9-6db9         I -  Vlanif26\r\n",
      "192.168.6.250   807c-6202-b8a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.247   4cbd-8f90-6d54  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.16    2428-fdc1-7333  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.3     1012-fb7a-2656  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.5     2428-fddc-be9d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.59    2428-fdc1-7698  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.164   2428-fdc1-7699  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.9     4cf5-dc97-343e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.100   accb-51de-42e4  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.2     4cf5-dc97-344e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.11    4cf5-dc97-366e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.4     f000-003b-4931  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.7     f000-003f-669d  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.13    f000-006c-6648  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.155   fcaa-1470-f02e  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.14    f000-006c-6811  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.78    94d9-b36c-2a90  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.216   5cde-3414-a887  6      D-0  Eth0/0/13  26\r\n",
      "192.168.6.130   4cbd-8fcc-90b6  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.18    2428-fdc1-76c7  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.19    2428-fdc1-76cc  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.198   081f-7130-405c  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.168   0017-6112-27a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.215   6461-4046-fc4d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.124   4cbd-8fd5-da71  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.169   70b5-e874-56e5  1      D-0  Eth0/0/16  26\r\n",
      "192.168.6.60    00e0-4c3c-a0db  7      D-0  Eth0/0/16  26\r\n",
      "192.168.6.31    f4b5-203b-2404  10     D-0  Eth0/0/16  26\r\n",
      "192.168.6.65    40b0-765f-6e47  12     D-0  Eth0/0/16  26\r\n",
      "192.168.6.45    0c9d-92cc-8c94  3      D-0  Eth0/0/16  26\r\n",
      "192.168.6.25    408d-5ce7-408c  14     D-0  Eth0/0/16  26\r\n",
      "192.168.6.21    b42e-9971-29cd  6      D-0  Eth0/0/16  26\r\n",
      "192.168.6.172   f4b5-203b-1eec  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.102   e0d5-5efc-0d5f  12     D-0  Eth0/0/15  26\r\n",
      "192.168.6.171   f4b5-2024-ef6b  6      D-0  Eth0/0/16  26\r\n",
      "192.168.28.1    80fb-06c9-6db9         I -  Vlanif28\r\n",
      "192.168.34.1    80fb-06c9-6db9         I -  Vlanif34\r\n",
      "192.168.34.8    b42e-9968-3f8c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.78   e0d5-5efc-0288  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.109  b42e-997a-2570  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.128  b42e-9904-6dda  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.4    b42e-99e6-329b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.203  0017-6112-a93b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.26   b42e-99ea-043c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.211  0017-6111-1ad0  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.243  24cf-24a4-2da8  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.202  0017-6112-ab50  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.90   00e0-7070-de71  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.125  e0d5-5e6d-bd23  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.44   fcaa-1422-a331  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.107  00e0-4cff-2c14  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.174  081f-7150-30de  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.7    00e0-4f03-2e24  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.166  7405-a563-fba3  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.155  b42e-991d-4210  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.153  f484-8df7-5db7  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.205  0017-6112-279e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.196  0840-f360-a0d8  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.99   e247-1f2c-0f6d  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.158  00e0-4f03-c582  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.195  5cde-34f7-014d  18     D-0  Eth0/0/11  34\r\n",
      "192.168.34.254  5475-959c-548b  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.244  c06d-ed2c-d964  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.39   c051-7ea4-099f  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.206  7486-e218-0a99  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.64   2428-fdc1-76d0  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.47   70b5-e874-5844  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.77   309c-237d-6c73  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.71   70b5-e874-4644  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.227  b42e-9944-2e6e  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.176  00e0-4c85-826d  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.150  6045-cb7f-c902  14     D-0  Eth0/0/11  34\r\n",
      "192.168.34.191  74d4-356d-891e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.188  b42e-997a-2550  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.111  f4b5-2024-f365  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.72   e0d5-5e51-ea27  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.79   f4b5-2024-f44c  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.81   f4b5-2024-ebaf  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.180  f4b5-2024-f19b  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.75   f4b5-203b-1e44  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.84   00e0-4c37-ace4  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.212  7486-e218-1afe  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.74   e0d5-5ec3-191d  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.182  fcaa-140d-3103  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.147  a85e-45a0-0b0e  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.56   00e0-4d95-1326  2      D-0  Eth0/0/11  34\r\n",
      "192.168.34.46   8469-9386-4585  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.121  408d-5cfd-e739  12     D-0  Eth0/0/11  34\r\n",
      "192.168.87.1    80fb-06c9-6db9         I -  Vlanif87\r\n",
      "192.168.87.97   f000-003f-58bf  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.25   f000-003f-669c  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.250  8ce7-486e-bf80  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.12   Incomplete      0      D-0  Eth0/0/1  87\r\n",
      "192.168.87.6    Incomplete      1      D-0  Eth0/0/1  87\r\n",
      "192.168.88.1    80fb-06c9-6db9         I -  Vlanif88\r\n",
      "192.168.88.253  4cbd-8f90-7198  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.254  686d-bcf6-0e91  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.131  2428-fdc1-76a4  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.251  4cbd-8f90-71a7  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.250  4cbd-8f90-719c  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.7    Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.160  Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.24   Incomplete      1      D-0  Eth0/0/1  88\r\n",
      "192.168.0.1     80fb-06c9-6db9         I -  Vlanif100\r\n",
      "192.168.0.45    2cea-7feb-b118  9      D-0  Eth0/0/20  100\r\n",
      "192.168.0.252   f4ee-0823-956a  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.177   9ca6-15d8-f7a2  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.107   2cea-7fed-051c  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.99    000c-294d-77f6  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.189   8ca6-dfc4-490d  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.11    0017-6112-b286  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.121   f4b5-2018-50e7  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.122   e0d5-5efa-1b79  9      D-0  Eth0/0/24  100\r\n",
      "10.0.0.2        80fb-06c9-6db9         I -  Vlanif200\r\n",
      "10.0.0.1        0c82-6858-7222  9      D-0  GE0/0/3  200\r\n",
      "192.168.201.1   80fb-06c9-6db9         I -  Vlanif201\r\n",
      "------------------------------------------------------------------------------\r\n",
      "Total:169       Dynamic:147     Static:0    Interface:22   \r\n",
      "<3700>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "8ff142a2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['192.168.11.1', '80fb-06c9-6db9', 'I - ', 'Vlanif11', ''], ['192.168.11.199', 'b42e-9968-4090', 'D-0', 'Eth0/0/1', '  11'], ['192.168.11.30', '4419-b641-7795', 'D-0', 'Eth0/0/1', '  11'], ['192.168.11.189', '0800-2740-3822', 'D-0', 'Eth0/0/1', '  11'], ['192.168.12.1', '80fb-06c9-6db9', 'I - ', 'Vlanif12', ''], ['192.168.13.1', '80fb-06c9-6db9', 'I - ', 'Vlanif13', ''], ['192.168.14.1', '80fb-06c9-6db9', 'I - ', 'Vlanif14', ''], ['192.168.14.13', '8269-c0e2-cbe1', 'D-0', 'Eth0/0/11', '  14'], ['192.168.15.1', '80fb-06c9-6db9', 'I - ', 'Vlanif15', ''], ['192.168.15.254', '8ca6-df43-6b43', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.33', '7427-eae8-fef9', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.177', '4ced-fb6c-ef9f', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.200', '408d-5c8f-2aca', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.88', 'b42e-99e6-3c49', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.63', '4ced-fb41-fba5', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.231', 'b42e-999d-1f99', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.136', '70b5-e874-5732', 'D-0', 'Eth0/0/5', '  15'], ['192.168.16.1', '80fb-06c9-6db9', 'I - ', 'Vlanif16', ''], ['192.168.17.1', '80fb-06c9-6db9', 'I - ', 'Vlanif17', ''], ['192.168.17.151', '4cf5-dc97-35a9', 'D-0', 'Eth0/0/11', '  17'], ['192.168.17.23', '4cf5-dc97-3695', 'D-0', 'Eth0/0/11', '  17'], ['192.168.17.11', '4cf5-dc97-3677', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.172', '4cf5-dc97-3421', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.152', 'acb9-2f46-05f5', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.249', '849a-4059-b273', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.4', '4cf5-dc97-36b4', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.150', '44a6-42b6-c0a3', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.38', 'e0d5-5e56-7edb', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.55', 'b42e-9979-de61', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.54', '00e0-4c52-032d', 'D-0', 'Eth0/0/7', '  17'], ['192.168.18.1', '80fb-06c9-6db9', 'I - ', 'Vlanif18', ''], ['192.168.19.1', '80fb-06c9-6db9', 'I - ', 'Vlanif19', ''], ['192.168.20.1', '80fb-06c9-6db9', 'I - ', 'Vlanif20', ''], ['192.168.20.3', '4cf5-dc9a-c39e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.188', '807c-62bb-4e1e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.2', '4cf5-dc97-3471', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.85', 'f46d-2fcf-c3ed', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.200', '0020-6ba3-4d7c', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.64', '2428-fdc1-76e4', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.135', 'e0d5-5ef7-0e13', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.136', 'f079-596c-908a', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.182', '408d-5c1d-9e3e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.74', 'd45d-6439-a7a3', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.66', '0c9d-920f-c668', 'D-0', 'Eth0/0/11', '  20'], ['192.168.20.116', '00e0-4c57-9160', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.134', 'e86a-642e-0446', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.101', 'a85e-45a0-0ace', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.198', '309c-23b9-101a', 'D-0', 'Eth0/0/9', '  20'], ['192.168.21.1', '80fb-06c9-6db9', 'I - ', 'Vlanif21', ''], ['192.168.22.1', '80fb-06c9-6db9', 'I - ', 'Vlanif22', ''], ['192.168.24.1', '80fb-06c9-6db9', 'I - ', 'Vlanif24', ''], ['192.168.25.1', '80fb-06c9-6db9', 'I - ', 'Vlanif25', ''], ['192.168.6.1', '80fb-06c9-6db9', 'I - ', 'Vlanif26', ''], ['192.168.6.250', '807c-6202-b8a1', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.247', '4cbd-8f90-6d54', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.16', '2428-fdc1-7333', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.3', '1012-fb7a-2656', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.5', '2428-fddc-be9d', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.59', '2428-fdc1-7698', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.164', '2428-fdc1-7699', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.9', '4cf5-dc97-343e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.100', 'accb-51de-42e4', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.2', '4cf5-dc97-344e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.11', '4cf5-dc97-366e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.4', 'f000-003b-4931', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.7', 'f000-003f-669d', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.13', 'f000-006c-6648', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.155', 'fcaa-1470-f02e', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.14', 'f000-006c-6811', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.78', '94d9-b36c-2a90', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.216', '5cde-3414-a887', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.130', '4cbd-8fcc-90b6', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.18', '2428-fdc1-76c7', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.19', '2428-fdc1-76cc', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.198', '081f-7130-405c', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.168', '0017-6112-27a1', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.215', '6461-4046-fc4d', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.124', '4cbd-8fd5-da71', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.169', '70b5-e874-56e5', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.60', '00e0-4c3c-a0db', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.31', 'f4b5-203b-2404', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.65', '40b0-765f-6e47', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.45', '0c9d-92cc-8c94', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.25', '408d-5ce7-408c', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.21', 'b42e-9971-29cd', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.172', 'f4b5-203b-1eec', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.102', 'e0d5-5efc-0d5f', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.171', 'f4b5-2024-ef6b', 'D-0', 'Eth0/0/16', '  26'], ['192.168.28.1', '80fb-06c9-6db9', 'I - ', 'Vlanif28', ''], ['192.168.34.1', '80fb-06c9-6db9', 'I - ', 'Vlanif34', ''], ['192.168.34.8', 'b42e-9968-3f8c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.78', 'e0d5-5efc-0288', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.109', 'b42e-997a-2570', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.128', 'b42e-9904-6dda', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.4', 'b42e-99e6-329b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.203', '0017-6112-a93b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.26', 'b42e-99ea-043c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.211', '0017-6111-1ad0', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.243', '24cf-24a4-2da8', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.202', '0017-6112-ab50', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.90', '00e0-7070-de71', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.125', 'e0d5-5e6d-bd23', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.44', 'fcaa-1422-a331', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.107', '00e0-4cff-2c14', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.174', '081f-7150-30de', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.7', '00e0-4f03-2e24', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.166', '7405-a563-fba3', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.155', 'b42e-991d-4210', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.153', 'f484-8df7-5db7', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.205', '0017-6112-279e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.196', '0840-f360-a0d8', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.99', 'e247-1f2c-0f6d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.158', '00e0-4f03-c582', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.195', '5cde-34f7-014d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.254', '5475-959c-548b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.244', 'c06d-ed2c-d964', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.39', 'c051-7ea4-099f', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.206', '7486-e218-0a99', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.64', '2428-fdc1-76d0', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.47', '70b5-e874-5844', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.77', '309c-237d-6c73', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.71', '70b5-e874-4644', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.227', 'b42e-9944-2e6e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.176', '00e0-4c85-826d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.150', '6045-cb7f-c902', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.191', '74d4-356d-891e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.188', 'b42e-997a-2550', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.111', 'f4b5-2024-f365', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.72', 'e0d5-5e51-ea27', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.79', 'f4b5-2024-f44c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.81', 'f4b5-2024-ebaf', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.180', 'f4b5-2024-f19b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.75', 'f4b5-203b-1e44', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.84', '00e0-4c37-ace4', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.212', '7486-e218-1afe', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.74', 'e0d5-5ec3-191d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.182', 'fcaa-140d-3103', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.147', 'a85e-45a0-0b0e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.56', '00e0-4d95-1326', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.46', '8469-9386-4585', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.121', '408d-5cfd-e739', 'D-0', 'Eth0/0/11', '  34'], ['192.168.87.1', '80fb-06c9-6db9', 'I - ', 'Vlanif87', ''], ['192.168.87.97', 'f000-003f-58bf', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.25', 'f000-003f-669c', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.250', '8ce7-486e-bf80', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.12', 'Incomplete', 'D-0', 'Eth0/0/1', '  87'], ['192.168.87.6', 'Incomplete', 'D-0', 'Eth0/0/1', '  87'], ['192.168.88.1', '80fb-06c9-6db9', 'I - ', 'Vlanif88', ''], ['192.168.88.253', '4cbd-8f90-7198', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.254', '686d-bcf6-0e91', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.131', '2428-fdc1-76a4', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.251', '4cbd-8f90-71a7', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.250', '4cbd-8f90-719c', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.7', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.88.160', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.88.24', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.0.1', '80fb-06c9-6db9', 'I - ', 'Vlanif100', ''], ['192.168.0.45', '2cea-7feb-b118', 'D-0', 'Eth0/0/20', '  100'], ['192.168.0.252', 'f4ee-0823-956a', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.177', '9ca6-15d8-f7a2', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.107', '2cea-7fed-051c', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.99', '000c-294d-77f6', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.189', '8ca6-dfc4-490d', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.11', '0017-6112-b286', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.121', 'f4b5-2018-50e7', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.122', 'e0d5-5efa-1b79', 'D-0', 'Eth0/0/24', '  100'], ['10.0.0.2', '80fb-06c9-6db9', 'I - ', 'Vlanif200', ''], ['10.0.0.1', '0c82-6858-7222', 'D-0', 'GE0/0/3', '  200'], ['192.168.201.1', '80fb-06c9-6db9', 'I - ', 'Vlanif201', '']]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "output = '''\n",
    "                  display arp\n",
    "IP ADDRESS      MAC ADDRESS  EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE         VLAN \n",
    "------------------------------------------------------------------------------\n",
    "192.168.11.1    80fb-06c9-6db9         I -  Vlanif11\n",
    "192.168.11.199  b42e-9968-4090  11     D-0  Eth0/0/1  11\n",
    "192.168.88.253  4cbd-8f90-7198  1      D-0  Eth0/0/11  88\n",
    "192.168.88.161  Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.88.253  4cbd-8f90-7198  1      D-0  Eth0/0/11  88\n",
    "192.168.88.161  Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.88.52   Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.0.1     80fb-06c9-6db9         I -  Vlanif100\n",
    "192.168.0.45    2cea-7feb-b118  20     D-0  Eth0/0/20  100\n",
    "192.168.0.252   f4ee-0823-956a  20     D-0  Eth0/0/24  100\n",
    "192.168.0.177   9ca6-15d8-f7a2  20     D-0  Eth0/0/24  100\n",
    "192.168.0.107   2cea-7fed-051c  18     D-0  Eth0/0/24  100\n",
    "192.168.0.99    e0d5-5efa-1b79  20     D-0  Eth0/0/24  100\n",
    "192.168.0.189   8ca6-dfc4-490d  20     D-0  Eth0/0/24  100\n",
    "192.168.0.11    0017-6112-b286  20     D-0  Eth0/0/24  100\n",
    "192.168.0.114   f4b5-2018-50e7  20     D-0  Eth0/0/24  100\n",
    "10.0.0.2        80fb-06c9-6db9         I -  Vlanif200\n",
    "10.0.0.1        0c82-6858-7222  20     D-0  GE0/0/3  200\n",
    "192.168.201.1   80fb-06c9-6db9         I -  Vlanif201\n",
    "------------------------------------------------------------------------------\n",
    "Total:173       Dynamic:151     Static:0    Interface:22   \n",
    "<3700>    \n",
    "'''\n",
    "\n",
    "f = open('display-arp.template')\n",
    "template = TextFSM(f)\n",
    "outTab = template.ParseText(tabStr)\n",
    "print (outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "d29caa35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "169"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "3dce0c49",
   "metadata": {},
   "outputs": [],
   "source": [
    "def hwArpRows(tabStr,tpl=\"display-arp.template\"):\n",
    "    f = open(tpl)\n",
    "    template = TextFSM(f)\n",
    "    outTab = template.ParseText(tabStr)\n",
    "    return  outTab\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "3ca73156",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "display arp\r\n",
      "IP ADDRESS      MAC ADDRESS  EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE         VLAN \r\n",
      "------------------------------------------------------------------------------\r\n",
      "192.168.11.1    80fb-06c9-6db9         I -  Vlanif11\r\n",
      "192.168.11.199  b42e-9968-4090  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.30   4419-b641-7795  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.189  0800-2740-3822  9      D-0  Eth0/0/1  11\r\n",
      "192.168.12.1    80fb-06c9-6db9         I -  Vlanif12\r\n",
      "192.168.13.1    80fb-06c9-6db9         I -  Vlanif13\r\n",
      "192.168.14.1    80fb-06c9-6db9         I -  Vlanif14\r\n",
      "192.168.14.13   8269-c0e2-cbe1  4      D-0  Eth0/0/11  14\r\n",
      "192.168.15.1    80fb-06c9-6db9         I -  Vlanif15\r\n",
      "192.168.15.254  8ca6-df43-6b43  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.33   7427-eae8-fef9  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.177  4ced-fb6c-ef9f  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.200  408d-5c8f-2aca  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.88   b42e-99e6-3c49  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.63   4ced-fb41-fba5  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.231  b42e-999d-1f99  1      D-0  Eth0/0/5  15\r\n",
      "192.168.15.136  70b5-e874-5732  7      D-0  Eth0/0/5  15\r\n",
      "192.168.16.1    80fb-06c9-6db9         I -  Vlanif16\r\n",
      "192.168.17.1    80fb-06c9-6db9         I -  Vlanif17\r\n",
      "192.168.17.151  4cf5-dc97-35a9  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.23   4cf5-dc97-3695  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.11   4cf5-dc97-3677  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.172  4cf5-dc97-3421  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.152  acb9-2f46-05f5  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.249  849a-4059-b273  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.4    4cf5-dc97-36b4  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.150  44a6-42b6-c0a3  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.38   e0d5-5e56-7edb  6      D-0  Eth0/0/7  17\r\n",
      "192.168.17.55   b42e-9979-de61  18     D-0  Eth0/0/7  17\r\n",
      "192.168.17.54   00e0-4c52-032d  18     D-0  Eth0/0/7  17\r\n",
      "192.168.18.1    80fb-06c9-6db9         I -  Vlanif18\r\n",
      "192.168.19.1    80fb-06c9-6db9         I -  Vlanif19\r\n",
      "192.168.20.1    80fb-06c9-6db9         I -  Vlanif20\r\n",
      "192.168.20.3    4cf5-dc9a-c39e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.188  807c-62bb-4e1e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.2    4cf5-dc97-3471  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.85   f46d-2fcf-c3ed  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.200  0020-6ba3-4d7c  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.64   2428-fdc1-76e4  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.135  e0d5-5ef7-0e13  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.136  f079-596c-908a  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.182  408d-5c1d-9e3e  13     D-0  Eth0/0/9  20\r\n",
      "192.168.20.74   d45d-6439-a7a3  7      D-0  Eth0/0/9  20\r\n",
      "192.168.20.66   0c9d-920f-c668  8      D-0  Eth0/0/11  20\r\n",
      "192.168.20.116  00e0-4c57-9160  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.134  e86a-642e-0446  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.101  a85e-45a0-0ace  12     D-0  Eth0/0/9  20\r\n",
      "192.168.20.198  309c-23b9-101a  16     D-0  Eth0/0/9  20\r\n",
      "192.168.21.1    80fb-06c9-6db9         I -  Vlanif21\r\n",
      "192.168.22.1    80fb-06c9-6db9         I -  Vlanif22\r\n",
      "192.168.24.1    80fb-06c9-6db9         I -  Vlanif24\r\n",
      "192.168.25.1    80fb-06c9-6db9         I -  Vlanif25\r\n",
      "192.168.6.1     80fb-06c9-6db9         I -  Vlanif26\r\n",
      "192.168.6.250   807c-6202-b8a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.247   4cbd-8f90-6d54  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.16    2428-fdc1-7333  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.3     1012-fb7a-2656  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.5     2428-fddc-be9d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.59    2428-fdc1-7698  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.164   2428-fdc1-7699  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.9     4cf5-dc97-343e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.100   accb-51de-42e4  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.2     4cf5-dc97-344e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.11    4cf5-dc97-366e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.4     f000-003b-4931  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.7     f000-003f-669d  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.13    f000-006c-6648  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.155   fcaa-1470-f02e  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.14    f000-006c-6811  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.78    94d9-b36c-2a90  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.216   5cde-3414-a887  6      D-0  Eth0/0/13  26\r\n",
      "192.168.6.130   4cbd-8fcc-90b6  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.18    2428-fdc1-76c7  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.19    2428-fdc1-76cc  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.198   081f-7130-405c  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.168   0017-6112-27a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.215   6461-4046-fc4d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.124   4cbd-8fd5-da71  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.169   70b5-e874-56e5  1      D-0  Eth0/0/16  26\r\n",
      "192.168.6.60    00e0-4c3c-a0db  7      D-0  Eth0/0/16  26\r\n",
      "192.168.6.31    f4b5-203b-2404  10     D-0  Eth0/0/16  26\r\n",
      "192.168.6.65    40b0-765f-6e47  12     D-0  Eth0/0/16  26\r\n",
      "192.168.6.45    0c9d-92cc-8c94  3      D-0  Eth0/0/16  26\r\n",
      "192.168.6.25    408d-5ce7-408c  14     D-0  Eth0/0/16  26\r\n",
      "192.168.6.21    b42e-9971-29cd  6      D-0  Eth0/0/16  26\r\n",
      "192.168.6.172   f4b5-203b-1eec  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.102   e0d5-5efc-0d5f  12     D-0  Eth0/0/15  26\r\n",
      "192.168.6.171   f4b5-2024-ef6b  6      D-0  Eth0/0/16  26\r\n",
      "192.168.28.1    80fb-06c9-6db9         I -  Vlanif28\r\n",
      "192.168.34.1    80fb-06c9-6db9         I -  Vlanif34\r\n",
      "192.168.34.8    b42e-9968-3f8c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.78   e0d5-5efc-0288  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.109  b42e-997a-2570  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.128  b42e-9904-6dda  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.4    b42e-99e6-329b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.203  0017-6112-a93b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.26   b42e-99ea-043c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.211  0017-6111-1ad0  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.243  24cf-24a4-2da8  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.202  0017-6112-ab50  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.90   00e0-7070-de71  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.125  e0d5-5e6d-bd23  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.44   fcaa-1422-a331  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.107  00e0-4cff-2c14  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.174  081f-7150-30de  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.7    00e0-4f03-2e24  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.166  7405-a563-fba3  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.155  b42e-991d-4210  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.153  f484-8df7-5db7  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.205  0017-6112-279e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.196  0840-f360-a0d8  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.99   e247-1f2c-0f6d  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.158  00e0-4f03-c582  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.195  5cde-34f7-014d  18     D-0  Eth0/0/11  34\r\n",
      "192.168.34.254  5475-959c-548b  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.244  c06d-ed2c-d964  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.39   c051-7ea4-099f  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.206  7486-e218-0a99  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.64   2428-fdc1-76d0  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.47   70b5-e874-5844  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.77   309c-237d-6c73  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.71   70b5-e874-4644  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.227  b42e-9944-2e6e  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.176  00e0-4c85-826d  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.150  6045-cb7f-c902  14     D-0  Eth0/0/11  34\r\n",
      "192.168.34.191  74d4-356d-891e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.188  b42e-997a-2550  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.111  f4b5-2024-f365  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.72   e0d5-5e51-ea27  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.79   f4b5-2024-f44c  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.81   f4b5-2024-ebaf  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.180  f4b5-2024-f19b  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.75   f4b5-203b-1e44  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.84   00e0-4c37-ace4  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.212  7486-e218-1afe  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.74   e0d5-5ec3-191d  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.182  fcaa-140d-3103  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.147  a85e-45a0-0b0e  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.56   00e0-4d95-1326  2      D-0  Eth0/0/11  34\r\n",
      "192.168.34.46   8469-9386-4585  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.121  408d-5cfd-e739  12     D-0  Eth0/0/11  34\r\n",
      "192.168.87.1    80fb-06c9-6db9         I -  Vlanif87\r\n",
      "192.168.87.97   f000-003f-58bf  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.25   f000-003f-669c  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.250  8ce7-486e-bf80  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.12   Incomplete      0      D-0  Eth0/0/1  87\r\n",
      "192.168.87.6    Incomplete      1      D-0  Eth0/0/1  87\r\n",
      "192.168.88.1    80fb-06c9-6db9         I -  Vlanif88\r\n",
      "192.168.88.253  4cbd-8f90-7198  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.254  686d-bcf6-0e91  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.131  2428-fdc1-76a4  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.251  4cbd-8f90-71a7  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.250  4cbd-8f90-719c  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.7    Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.160  Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.24   Incomplete      1      D-0  Eth0/0/1  88\r\n",
      "192.168.0.1     80fb-06c9-6db9         I -  Vlanif100\r\n",
      "192.168.0.45    2cea-7feb-b118  9      D-0  Eth0/0/20  100\r\n",
      "192.168.0.252   f4ee-0823-956a  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.177   9ca6-15d8-f7a2  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.107   2cea-7fed-051c  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.99    000c-294d-77f6  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.189   8ca6-dfc4-490d  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.11    0017-6112-b286  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.121   f4b5-2018-50e7  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.122   e0d5-5efa-1b79  9      D-0  Eth0/0/24  100\r\n",
      "10.0.0.2        80fb-06c9-6db9         I -  Vlanif200\r\n",
      "10.0.0.1        0c82-6858-7222  9      D-0  GE0/0/3  200\r\n",
      "192.168.201.1   80fb-06c9-6db9         I -  Vlanif201\r\n",
      "------------------------------------------------------------------------------\r\n",
      "Total:169       Dynamic:147     Static:0    Interface:22   \r\n",
      "<3700>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "b782e9a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "def hwMacTab(tn):\n",
    "    \"\"\" 返回交换 arp表\"\"\"\n",
    "    tabLs = []\n",
    "    tn.write(b\" display mac-address\\n\")\n",
    "    while 1 :\n",
    "        outLs = tn.expect([b\"\\r\\n<.+?>\",b\"---- More ----\"],timeout=5) \n",
    "        if outLs[0] == 1:\n",
    "            #还有下一个页\n",
    "            tn.write(b\"   \")\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            #print(outLs[2])\n",
    "        if outLs[0] <= 0:\n",
    "            # 完成读取\n",
    "            #print(outLs[2])\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            break\n",
    "    return tabLs\n",
    "def hwMacRows(tabStr,tpl=\"display-mac.template\"):\n",
    "    f = open(tpl)\n",
    "    template = TextFSM(f)\n",
    "    outTab = template.ParseText(tabStr)\n",
    "    return  outTab\n",
    "    \n",
    "tabLs = hwMacTab(tn)\n",
    "tabStr = list2str(tabLs)                          \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "2c5c1b0b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                           display mac-address\r\n",
      "MAC address table of slot 0:\r\n",
      "-------------------------------------------------------------------------------\r\n",
      "MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  \r\n",
      "               VSI/SI                                              MAC-Tunnel  \r\n",
      "-------------------------------------------------------------------------------\r\n",
      "00e0-4c37-ace4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5ef7-0e13 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "00e0-4cff-2c14 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "7427-eae8-fef9 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "acb9-2f24-2384 88          -      -      Eth0/0/1        dynamic   -           \r\n",
      "e0d5-5e56-7edb 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "5cde-3414-a887 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f4b5-203b-2404 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "70b5-e874-5844 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9904-6dda 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-f44c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-8155 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-8167 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-99e6-3c49 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "e062-9087-a15a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-83af 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4f03-2e24 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "6045-cb7f-c902 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e247-1f2c-0f6d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-999d-1f99 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "8469-9386-4585 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2cea-7feb-b118 100         -      -      Eth0/0/20       dynamic   -           \r\n",
      "e062-9082-2258 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "408d-5c1d-9e3e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8f90-71a7 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0c9d-92cc-8c94 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "b42e-9968-3f8c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f90-719c 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f90-7198 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fba-d022 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9944-2e6e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9979-de61 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "309c-23b9-101a 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fba-d012 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efc-0d5f 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "309c-2365-209e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fcc-9024 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5e6d-bd23 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fcc-90b6 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "4cf5-dc9a-c39e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fcc-90b8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "c06d-ed2c-d964 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3471 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2018-50e7 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "4cf5-dc97-344e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "e062-90eb-0492 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "4cf5-dc97-343e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "4cf5-dc97-3421 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "4419-b649-8619 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8609 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5e51-ea27 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9971-29cd 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "4419-b649-86fc 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-86fd 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003f-64a8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003f-64aa 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e40c-fdb5-8d5f 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2024-f19b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efa-1b79 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "f000-006c-4574 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5475-959c-548b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8716 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8717 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8714 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8718 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-871c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8706 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8705 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-870a 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "4419-b649-8709 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-870f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-87f4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-87da 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b641-7795 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "4cf5-dc97-35a9 17          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3677 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "e062-90f6-66b9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-366e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "acb9-2f46-05f5 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "4cbd-8f2c-9597 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0c82-6858-7222 200         -      -      GE0/0/3         dynamic   -           \r\n",
      "f000-006c-6648 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "d258-42b8-7696 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "b83a-080e-f650 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "2cea-7fed-051c 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "849a-4059-b273 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "44a6-42b6-c0a3 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "f000-003f-669d 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "0017-6112-279e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0017-6112-27a1 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "4cbd-8f2c-9572 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-36b4 17          -      -      Eth0/0/7        dynamic   -\r\n",
      "408d-5c8f-2aca 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "4cbd-8f2c-957c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "a85e-45a0-0b0e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3695 17          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8498 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0020-6ba3-4d7c 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f000-003f-669c 87          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8575 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "a85e-45a0-0ace 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "e0d5-5ec3-191d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "c051-7ea4-099f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0800-2740-3822 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "a85e-455a-5a7c 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "2428-fddc-be9d 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "e062-90c9-1712 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-67ee 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-85b6 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "d45d-6439-a7a3 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2024-f365 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-997a-2570 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb6c-ef9f 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "e86a-642e-0446 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "0017-6112-a93b 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "b42e-997a-2550 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-485d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-4854 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-db1e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f46d-2fcf-c3ed 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8f79-1b84 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-487f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b80 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-6811 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "6461-4046-fc4d 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f000-003f-589e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-489a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "74d4-356d-891e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b76 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b7a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dbd4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90dd-0803 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cb0-0810-6c1e 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "8ca6-df43-6b43 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "40b0-765f-6e47 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "4cbd-8f79-1b53 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-48a1 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b2a 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "f000-003f-58bf 87          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-1470-f02e 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "0c9d-920f-c668 20          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da71 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f000-003b-4931 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "e062-9032-a966 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da6e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-4935 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da70 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5cde-34f7-014d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8220-c9c9-82b6 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "e062-90bb-c9b5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-494a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-908d-9995 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8269-c0e2-cbe1 14          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-902f-e906 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "081f-7130-405c 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "0030-1bba-02db 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-140d-3103 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f079-596c-908a 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "8811-96af-173e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "081f-7150-30de 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4ee-0823-956a 100         -      -      Eth0/0/24       dynamic   -\r\n",
      "4cbd-8fd5-da85 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-99ea-043c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da95 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd3-2aa9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dab2 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dab0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8ca6-dfc4-490d 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "4cbd-8f79-19ca 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4f03-c582 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-19ac 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "686d-bcf6-0e91 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5850-ed6d-2f7b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0017-6112-ab50 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006b-da3e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-203b-1eec 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "5850-ed6d-2f60 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90bb-da7a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1968 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-7333 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "807c-6202-b8a1 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "7405-a563-fba3 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-203b-1e44 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8ce7-486e-bf80 87          -      -      Eth0/0/11       dynamic   -\r\n",
      "728a-a3ba-da4f 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "408d-5cfd-e739 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90b0-4b6a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-1422-a331 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0840-f360-a0d8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-ef6b 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "0017-6111-1ad0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb41-fba5 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "00e0-4c3c-a0db 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "7486-e218-0a99 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "7486-e218-1afe 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efc-0288 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb41-fb44 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "807c-62bb-4e1e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "408d-5ce7-408c 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "e062-908a-bdc9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "1012-fb7a-2656 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "94d9-b36c-2a90 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "00e0-4c57-9160 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "b42e-9968-4090 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "24cf-24a4-2da8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4c85-826d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "70b5-e874-56e5 26          -      -      Eth0/0/16       dynamic   -\r\n",
      "4cbd-8f90-6d54 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "00e0-4d95-1326 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beb3 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beab 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beaf 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "9ca6-15d8-f7a2 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "00e0-7070-de71 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "000c-294d-77f6 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "f000-003a-bec0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-bec5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8630-12f1-da35 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f000-003a-bee5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-991d-4210 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76a4 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76e4 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "2428-fdc1-76d0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-ebaf 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76c7 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "2428-fdc1-76cc 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "2428-fdc1-7699 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "2428-fdc1-7698 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "b42e-99e6-329b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4c52-032d 17          -      -      Eth0/0/7        dynamic   -\r\n",
      "309c-237d-6c73 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "accb-51de-42e4 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "70b5-e874-5732 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "\r\n",
      "-------------------------------------------------------------------------------\r\n",
      "Total matching items on slot 0 displayed = 233 \n",
      "\r\n",
      "<3700>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "e99f5a47",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['00e0-4c37-ace4', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5ef7-0e13', '20', 'Eth0/0/9'],\n",
       " ['00e0-4cff-2c14', '34', 'Eth0/0/11'],\n",
       " ['7427-eae8-fef9', '15', 'Eth0/0/5'],\n",
       " ['acb9-2f24-2384', '88', 'Eth0/0/1'],\n",
       " ['e0d5-5e56-7edb', '17', 'Eth0/0/7'],\n",
       " ['5cde-3414-a887', '26', 'Eth0/0/13'],\n",
       " ['f4b5-203b-2404', '26', 'Eth0/0/16'],\n",
       " ['70b5-e874-5844', '34', 'Eth0/0/11'],\n",
       " ['b42e-9904-6dda', '34', 'Eth0/0/11'],\n",
       " ['f4b5-2024-f44c', '34', 'Eth0/0/11'],\n",
       " ['f000-006c-8155', '34', 'Eth0/0/11'],\n",
       " ['f000-006c-8167', '34', 'Eth0/0/11'],\n",
       " ['b42e-99e6-3c49', '15', 'Eth0/0/5'],\n",
       " ['e062-9087-a15a', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-83af', '34', 'Eth0/0/11'],\n",
       " ['00e0-4f03-2e24', '34', 'Eth0/0/11'],\n",
       " ['6045-cb7f-c902', '34', 'Eth0/0/11'],\n",
       " ['e247-1f2c-0f6d', '34', 'Eth0/0/11'],\n",
       " ['b42e-999d-1f99', '15', 'Eth0/0/5'],\n",
       " ['8469-9386-4585', '34', 'Eth0/0/11'],\n",
       " ['2cea-7feb-b118', '100', 'Eth0/0/20'],\n",
       " ['e062-9082-2258', '34', 'Eth0/0/11'],\n",
       " ['408d-5c1d-9e3e', '20', 'Eth0/0/9'],\n",
       " ['4cbd-8f90-71a7', '88', 'Eth0/0/11'],\n",
       " ['0c9d-92cc-8c94', '26', 'Eth0/0/16'],\n",
       " ['b42e-9968-3f8c', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f90-719c', '88', 'Eth0/0/11'],\n",
       " ['4cbd-8f90-7198', '88', 'Eth0/0/11'],\n",
       " ['4cbd-8fba-d022', '34', 'Eth0/0/11'],\n",
       " ['b42e-9944-2e6e', '34', 'Eth0/0/11'],\n",
       " ['b42e-9979-de61', '17', 'Eth0/0/7'],\n",
       " ['309c-23b9-101a', '20', 'Eth0/0/9'],\n",
       " ['4cbd-8fba-d012', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5efc-0d5f', '26', 'Eth0/0/15'],\n",
       " ['309c-2365-209e', '20', 'Eth0/0/9'],\n",
       " ['4cbd-8fcc-9024', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5e6d-bd23', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fcc-90b6', '26', 'Eth0/0/13'],\n",
       " ['4cf5-dc9a-c39e', '20', 'Eth0/0/9'],\n",
       " ['4cbd-8fcc-90b8', '34', 'Eth0/0/11'],\n",
       " ['c06d-ed2c-d964', '34', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-3471', '20', 'Eth0/0/9'],\n",
       " ['f4b5-2018-50e7', '100', 'Eth0/0/24'],\n",
       " ['4cf5-dc97-344e', '26', 'Eth0/0/15'],\n",
       " ['e062-90eb-0492', '34', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-343e', '26', 'Eth0/0/15'],\n",
       " ['4cf5-dc97-3421', '17', 'Eth0/0/7'],\n",
       " ['4419-b649-8619', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8609', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5e51-ea27', '34', 'Eth0/0/11'],\n",
       " ['b42e-9971-29cd', '26', 'Eth0/0/16'],\n",
       " ['4419-b649-86fc', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-86fd', '34', 'Eth0/0/11'],\n",
       " ['f000-003f-64a8', '34', 'Eth0/0/11'],\n",
       " ['f000-003f-64aa', '34', 'Eth0/0/11'],\n",
       " ['e40c-fdb5-8d5f', '20', 'Eth0/0/9'],\n",
       " ['f4b5-2024-f19b', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5efa-1b79', '100', 'Eth0/0/24'],\n",
       " ['f000-006c-4574', '34', 'Eth0/0/11'],\n",
       " ['5475-959c-548b', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8716', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8717', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8714', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8718', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-871c', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8706', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8705', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-870a', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-8709', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-870f', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-87f4', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-87da', '34', 'Eth0/0/11'],\n",
       " ['4419-b641-7795', '11', 'Eth0/0/1'],\n",
       " ['4cf5-dc97-35a9', '17', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-3677', '17', 'Eth0/0/7'],\n",
       " ['e062-90f6-66b9', '34', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-366e', '26', 'Eth0/0/15'],\n",
       " ['acb9-2f46-05f5', '17', 'Eth0/0/7'],\n",
       " ['4cbd-8f2c-9597', '34', 'Eth0/0/11'],\n",
       " ['0c82-6858-7222', '200', 'GE0/0/3'],\n",
       " ['f000-006c-6648', '26', 'Eth0/0/15'],\n",
       " ['d258-42b8-7696', '20', 'Eth0/0/9'],\n",
       " ['b83a-080e-f650', '20', 'Eth0/0/9'],\n",
       " ['2cea-7fed-051c', '100', 'Eth0/0/24'],\n",
       " ['849a-4059-b273', '17', 'Eth0/0/7'],\n",
       " ['44a6-42b6-c0a3', '17', 'Eth0/0/7'],\n",
       " ['f000-003f-669d', '26', 'Eth0/0/15'],\n",
       " ['0017-6112-279e', '34', 'Eth0/0/11'],\n",
       " ['0017-6112-27a1', '26', 'Eth0/0/13'],\n",
       " ['4cbd-8f2c-9572', '34', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-36b4', '17', 'Eth0/0/7'],\n",
       " ['408d-5c8f-2aca', '15', 'Eth0/0/5'],\n",
       " ['4cbd-8f2c-957c', '34', 'Eth0/0/11'],\n",
       " ['a85e-45a0-0b0e', '34', 'Eth0/0/11'],\n",
       " ['4cf5-dc97-3695', '17', 'Eth0/0/11'],\n",
       " ['4419-b649-8498', '34', 'Eth0/0/11'],\n",
       " ['0020-6ba3-4d7c', '20', 'Eth0/0/9'],\n",
       " ['f000-003f-669c', '87', 'Eth0/0/11'],\n",
       " ['4419-b649-8575', '34', 'Eth0/0/11'],\n",
       " ['a85e-45a0-0ace', '20', 'Eth0/0/9'],\n",
       " ['e0d5-5ec3-191d', '34', 'Eth0/0/11'],\n",
       " ['c051-7ea4-099f', '34', 'Eth0/0/11'],\n",
       " ['0800-2740-3822', '11', 'Eth0/0/1'],\n",
       " ['a85e-455a-5a7c', '17', 'Eth0/0/7'],\n",
       " ['2428-fddc-be9d', '26', 'Eth0/0/13'],\n",
       " ['e062-90c9-1712', '34', 'Eth0/0/11'],\n",
       " ['f000-006c-67ee', '34', 'Eth0/0/11'],\n",
       " ['4419-b649-85b6', '34', 'Eth0/0/11'],\n",
       " ['d45d-6439-a7a3', '20', 'Eth0/0/9'],\n",
       " ['f4b5-2024-f365', '34', 'Eth0/0/11'],\n",
       " ['b42e-997a-2570', '34', 'Eth0/0/11'],\n",
       " ['4ced-fb6c-ef9f', '15', 'Eth0/0/5'],\n",
       " ['e86a-642e-0446', '20', 'Eth0/0/9'],\n",
       " ['0017-6112-a93b', '34', 'Eth0/0/11'],\n",
       " ['b42e-997a-2550', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-485d', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-4854', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-db1e', '34', 'Eth0/0/11'],\n",
       " ['f46d-2fcf-c3ed', '20', 'Eth0/0/9'],\n",
       " ['4cbd-8f79-1b84', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-487f', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-1b80', '34', 'Eth0/0/11'],\n",
       " ['f000-006c-6811', '26', 'Eth0/0/15'],\n",
       " ['6461-4046-fc4d', '26', 'Eth0/0/13'],\n",
       " ['f000-003f-589e', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-489a', '34', 'Eth0/0/11'],\n",
       " ['74d4-356d-891e', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-1b76', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-1b7a', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-dbd4', '34', 'Eth0/0/11'],\n",
       " ['e062-90dd-0803', '34', 'Eth0/0/11'],\n",
       " ['4cb0-0810-6c1e', '26', 'Eth0/0/13'],\n",
       " ['8ca6-df43-6b43', '15', 'Eth0/0/5'],\n",
       " ['40b0-765f-6e47', '26', 'Eth0/0/16'],\n",
       " ['4cbd-8f79-1b53', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-48a1', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-1b2a', '34', 'Eth0/0/11'],\n",
       " ['f000-003f-58bf', '87', 'Eth0/0/11'],\n",
       " ['fcaa-1470-f02e', '26', 'Eth0/0/16'],\n",
       " ['0c9d-920f-c668', '20', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-da71', '26', 'Eth0/0/13'],\n",
       " ['f000-003b-4931', '26', 'Eth0/0/15'],\n",
       " ['e062-9032-a966', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-da6e', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-4935', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-da70', '34', 'Eth0/0/11'],\n",
       " ['5cde-34f7-014d', '34', 'Eth0/0/11'],\n",
       " ['8220-c9c9-82b6', '20', 'Eth0/0/9'],\n",
       " ['e062-90bb-c9b5', '34', 'Eth0/0/11'],\n",
       " ['f000-003b-494a', '34', 'Eth0/0/11'],\n",
       " ['e062-908d-9995', '34', 'Eth0/0/11'],\n",
       " ['8269-c0e2-cbe1', '14', 'Eth0/0/11'],\n",
       " ['e062-902f-e906', '34', 'Eth0/0/11'],\n",
       " ['081f-7130-405c', '26', 'Eth0/0/13'],\n",
       " ['0030-1bba-02db', '34', 'Eth0/0/11'],\n",
       " ['fcaa-140d-3103', '34', 'Eth0/0/11'],\n",
       " ['f079-596c-908a', '20', 'Eth0/0/9'],\n",
       " ['8811-96af-173e', '20', 'Eth0/0/9'],\n",
       " ['081f-7150-30de', '34', 'Eth0/0/11'],\n",
       " ['f4ee-0823-956a', '100', 'Eth0/0/24'],\n",
       " ['4cbd-8fd5-da85', '34', 'Eth0/0/11'],\n",
       " ['b42e-99ea-043c', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-da95', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd3-2aa9', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-dab2', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8fd5-dab0', '34', 'Eth0/0/11'],\n",
       " ['8ca6-dfc4-490d', '100', 'Eth0/0/24'],\n",
       " ['4cbd-8f79-19ca', '34', 'Eth0/0/11'],\n",
       " ['00e0-4f03-c582', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-19ac', '34', 'Eth0/0/11'],\n",
       " ['686d-bcf6-0e91', '88', 'Eth0/0/11'],\n",
       " ['5850-ed6d-2f7b', '34', 'Eth0/0/11'],\n",
       " ['0017-6112-ab50', '34', 'Eth0/0/11'],\n",
       " ['f000-006b-da3e', '34', 'Eth0/0/11'],\n",
       " ['f4b5-203b-1eec', '26', 'Eth0/0/16'],\n",
       " ['5850-ed6d-2f60', '34', 'Eth0/0/11'],\n",
       " ['e062-90bb-da7a', '34', 'Eth0/0/11'],\n",
       " ['4cbd-8f79-1968', '34', 'Eth0/0/11'],\n",
       " ['2428-fdc1-7333', '26', 'Eth0/0/13'],\n",
       " ['807c-6202-b8a1', '26', 'Eth0/0/13'],\n",
       " ['7405-a563-fba3', '34', 'Eth0/0/11'],\n",
       " ['f4b5-203b-1e44', '34', 'Eth0/0/11'],\n",
       " ['8ce7-486e-bf80', '87', 'Eth0/0/11'],\n",
       " ['728a-a3ba-da4f', '20', 'Eth0/0/9'],\n",
       " ['408d-5cfd-e739', '34', 'Eth0/0/11'],\n",
       " ['e062-90b0-4b6a', '34', 'Eth0/0/11'],\n",
       " ['fcaa-1422-a331', '34', 'Eth0/0/11'],\n",
       " ['0840-f360-a0d8', '34', 'Eth0/0/11'],\n",
       " ['f4b5-2024-ef6b', '26', 'Eth0/0/16'],\n",
       " ['0017-6111-1ad0', '34', 'Eth0/0/11'],\n",
       " ['4ced-fb41-fba5', '15', 'Eth0/0/5'],\n",
       " ['00e0-4c3c-a0db', '26', 'Eth0/0/16'],\n",
       " ['7486-e218-0a99', '34', 'Eth0/0/11'],\n",
       " ['7486-e218-1afe', '34', 'Eth0/0/11'],\n",
       " ['e0d5-5efc-0288', '34', 'Eth0/0/11'],\n",
       " ['4ced-fb41-fb44', '34', 'Eth0/0/11'],\n",
       " ['807c-62bb-4e1e', '20', 'Eth0/0/9'],\n",
       " ['408d-5ce7-408c', '26', 'Eth0/0/16'],\n",
       " ['e062-908a-bdc9', '34', 'Eth0/0/11'],\n",
       " ['1012-fb7a-2656', '26', 'Eth0/0/13'],\n",
       " ['94d9-b36c-2a90', '26', 'Eth0/0/16'],\n",
       " ['00e0-4c57-9160', '20', 'Eth0/0/9'],\n",
       " ['b42e-9968-4090', '11', 'Eth0/0/1'],\n",
       " ['24cf-24a4-2da8', '34', 'Eth0/0/11'],\n",
       " ['00e0-4c85-826d', '34', 'Eth0/0/11'],\n",
       " ['70b5-e874-56e5', '26', 'Eth0/0/16'],\n",
       " ['4cbd-8f90-6d54', '26', 'Eth0/0/13'],\n",
       " ['00e0-4d95-1326', '34', 'Eth0/0/11'],\n",
       " ['f000-003a-beb3', '34', 'Eth0/0/11'],\n",
       " ['f000-003a-beab', '34', 'Eth0/0/11'],\n",
       " ['f000-003a-beaf', '34', 'Eth0/0/11'],\n",
       " ['9ca6-15d8-f7a2', '100', 'Eth0/0/24'],\n",
       " ['00e0-7070-de71', '34', 'Eth0/0/11'],\n",
       " ['000c-294d-77f6', '100', 'Eth0/0/24'],\n",
       " ['f000-003a-bec0', '34', 'Eth0/0/11'],\n",
       " ['f000-003a-bec5', '34', 'Eth0/0/11'],\n",
       " ['8630-12f1-da35', '20', 'Eth0/0/9'],\n",
       " ['f000-003a-bee5', '34', 'Eth0/0/11'],\n",
       " ['b42e-991d-4210', '34', 'Eth0/0/11'],\n",
       " ['2428-fdc1-76a4', '88', 'Eth0/0/11'],\n",
       " ['2428-fdc1-76e4', '20', 'Eth0/0/9'],\n",
       " ['2428-fdc1-76d0', '34', 'Eth0/0/11'],\n",
       " ['f4b5-2024-ebaf', '34', 'Eth0/0/11'],\n",
       " ['2428-fdc1-76c7', '26', 'Eth0/0/13'],\n",
       " ['2428-fdc1-76cc', '26', 'Eth0/0/13'],\n",
       " ['2428-fdc1-7699', '26', 'Eth0/0/15'],\n",
       " ['2428-fdc1-7698', '26', 'Eth0/0/13'],\n",
       " ['b42e-99e6-329b', '34', 'Eth0/0/11'],\n",
       " ['00e0-4c52-032d', '17', 'Eth0/0/7'],\n",
       " ['309c-237d-6c73', '34', 'Eth0/0/11'],\n",
       " ['accb-51de-42e4', '26', 'Eth0/0/15'],\n",
       " ['70b5-e874-5732', '15', 'Eth0/0/5']]"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "outTab = hwMacRows(tabStr)\n",
    "outTab"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "b4667bcc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                           display mac-address\r\n",
      "MAC address table of slot 0:\r\n",
      "-------------------------------------------------------------------------------\r\n",
      "MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  \r\n",
      "               VSI/SI                                              MAC-Tunnel  \r\n",
      "-------------------------------------------------------------------------------\r\n",
      "00e0-4c37-ace4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5ef7-0e13 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "00e0-4cff-2c14 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "7427-eae8-fef9 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "acb9-2f24-2384 88          -      -      Eth0/0/1        dynamic   -           \r\n",
      "e0d5-5e56-7edb 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "5cde-3414-a887 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f4b5-203b-2404 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "70b5-e874-5844 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9904-6dda 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-f44c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-8155 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-8167 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-99e6-3c49 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "e062-9087-a15a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-83af 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4f03-2e24 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "6045-cb7f-c902 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e247-1f2c-0f6d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-999d-1f99 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "8469-9386-4585 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2cea-7feb-b118 100         -      -      Eth0/0/20       dynamic   -           \r\n",
      "e062-9082-2258 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "408d-5c1d-9e3e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8f90-71a7 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0c9d-92cc-8c94 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "b42e-9968-3f8c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f90-719c 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f90-7198 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fba-d022 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9944-2e6e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9979-de61 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "309c-23b9-101a 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fba-d012 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efc-0d5f 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "309c-2365-209e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fcc-9024 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5e6d-bd23 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fcc-90b6 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "4cf5-dc9a-c39e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8fcc-90b8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "c06d-ed2c-d964 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3471 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2018-50e7 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "4cf5-dc97-344e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "e062-90eb-0492 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "4cf5-dc97-343e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "4cf5-dc97-3421 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "4419-b649-8619 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8609 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5e51-ea27 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-9971-29cd 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "4419-b649-86fc 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-86fd 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003f-64a8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003f-64aa 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e40c-fdb5-8d5f 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2024-f19b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efa-1b79 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "f000-006c-4574 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5475-959c-548b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8716 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8717 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8714 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8718 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-871c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8706 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8705 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-870a 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "4419-b649-8709 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-870f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-87f4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-87da 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b641-7795 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "4cf5-dc97-35a9 17          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3677 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "e062-90f6-66b9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-366e 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "acb9-2f46-05f5 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "4cbd-8f2c-9597 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0c82-6858-7222 200         -      -      GE0/0/3         dynamic   -           \r\n",
      "f000-006c-6648 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "d258-42b8-7696 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "b83a-080e-f650 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "2cea-7fed-051c 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "849a-4059-b273 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "44a6-42b6-c0a3 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "f000-003f-669d 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "0017-6112-279e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0017-6112-27a1 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "4cbd-8f2c-9572 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-36b4 17          -      -      Eth0/0/7        dynamic   -\r\n",
      "408d-5c8f-2aca 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "4cbd-8f2c-957c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "a85e-45a0-0b0e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cf5-dc97-3695 17          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8498 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0020-6ba3-4d7c 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f000-003f-669c 87          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-8575 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "a85e-45a0-0ace 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "e0d5-5ec3-191d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "c051-7ea4-099f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0800-2740-3822 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "a85e-455a-5a7c 17          -      -      Eth0/0/7        dynamic   -           \r\n",
      "2428-fddc-be9d 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "e062-90c9-1712 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-67ee 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4419-b649-85b6 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "d45d-6439-a7a3 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f4b5-2024-f365 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-997a-2570 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb6c-ef9f 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "e86a-642e-0446 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "0017-6112-a93b 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "b42e-997a-2550 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-485d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-4854 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-db1e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f46d-2fcf-c3ed 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "4cbd-8f79-1b84 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-487f 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b80 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006c-6811 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "6461-4046-fc4d 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f000-003f-589e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-489a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "74d4-356d-891e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b76 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b7a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dbd4 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90dd-0803 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cb0-0810-6c1e 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "8ca6-df43-6b43 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "40b0-765f-6e47 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "4cbd-8f79-1b53 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-48a1 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1b2a 34          -      -      Eth0/0/11       dynamic   -\r\n",
      "f000-003f-58bf 87          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-1470-f02e 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "0c9d-920f-c668 20          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da71 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "f000-003b-4931 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "e062-9032-a966 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da6e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-4935 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da70 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5cde-34f7-014d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8220-c9c9-82b6 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "e062-90bb-c9b5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003b-494a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-908d-9995 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8269-c0e2-cbe1 14          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-902f-e906 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "081f-7130-405c 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "0030-1bba-02db 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-140d-3103 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f079-596c-908a 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "8811-96af-173e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "081f-7150-30de 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4ee-0823-956a 100         -      -      Eth0/0/24       dynamic   -\r\n",
      "4cbd-8fd5-da85 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-99ea-043c 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-da95 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd3-2aa9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dab2 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8fd5-dab0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8ca6-dfc4-490d 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "4cbd-8f79-19ca 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4f03-c582 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-19ac 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "686d-bcf6-0e91 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "5850-ed6d-2f7b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0017-6112-ab50 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-006b-da3e 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-203b-1eec 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "5850-ed6d-2f60 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90bb-da7a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4cbd-8f79-1968 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-7333 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "807c-6202-b8a1 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "7405-a563-fba3 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-203b-1e44 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8ce7-486e-bf80 87          -      -      Eth0/0/11       dynamic   -\r\n",
      "728a-a3ba-da4f 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "408d-5cfd-e739 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e062-90b0-4b6a 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "fcaa-1422-a331 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "0840-f360-a0d8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-ef6b 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "0017-6111-1ad0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb41-fba5 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "00e0-4c3c-a0db 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "7486-e218-0a99 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "7486-e218-1afe 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "e0d5-5efc-0288 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "4ced-fb41-fb44 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "807c-62bb-4e1e 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "408d-5ce7-408c 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "e062-908a-bdc9 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "1012-fb7a-2656 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "94d9-b36c-2a90 26          -      -      Eth0/0/16       dynamic   -           \r\n",
      "00e0-4c57-9160 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "b42e-9968-4090 11          -      -      Eth0/0/1        dynamic   -           \r\n",
      "24cf-24a4-2da8 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4c85-826d 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "70b5-e874-56e5 26          -      -      Eth0/0/16       dynamic   -\r\n",
      "4cbd-8f90-6d54 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "00e0-4d95-1326 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beb3 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beab 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-beaf 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "9ca6-15d8-f7a2 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "00e0-7070-de71 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "000c-294d-77f6 100         -      -      Eth0/0/24       dynamic   -           \r\n",
      "f000-003a-bec0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f000-003a-bec5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "8630-12f1-da35 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "f000-003a-bee5 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "b42e-991d-4210 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76a4 88          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76e4 20          -      -      Eth0/0/9        dynamic   -           \r\n",
      "2428-fdc1-76d0 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "f4b5-2024-ebaf 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "2428-fdc1-76c7 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "2428-fdc1-76cc 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "2428-fdc1-7699 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "2428-fdc1-7698 26          -      -      Eth0/0/13       dynamic   -           \r\n",
      "b42e-99e6-329b 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "00e0-4c52-032d 17          -      -      Eth0/0/7        dynamic   -\r\n",
      "309c-237d-6c73 34          -      -      Eth0/0/11       dynamic   -           \r\n",
      "accb-51de-42e4 26          -      -      Eth0/0/15       dynamic   -           \r\n",
      "70b5-e874-5732 15          -      -      Eth0/0/5        dynamic   -           \r\n",
      "\r\n",
      "-------------------------------------------------------------------------------\r\n",
      "Total matching items on slot 0 displayed = 233 \n",
      "\r\n",
      "<3700>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "b7aaafb8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['00e0-4c37-ace4', '34', 'Eth0/0/11'], ['e0d5-5ef7-0e13', '20', 'Eth0/0/9'], ['00e0-4cff-2c14', '34', 'Eth0/0/11'], ['7427-eae8-fef9', '15', 'Eth0/0/5'], ['acb9-2f24-2384', '88', 'Eth0/0/1'], ['e0d5-5e56-7edb', '17', 'Eth0/0/7'], ['5cde-3414-a887', '26', 'Eth0/0/13'], ['f4b5-203b-2404', '26', 'Eth0/0/16'], ['70b5-e874-5844', '34', 'Eth0/0/11'], ['b42e-9904-6dda', '34', 'Eth0/0/11'], ['f4b5-2024-f44c', '34', 'Eth0/0/11'], ['f000-006c-8155', '34', 'Eth0/0/11'], ['f000-006c-8167', '34', 'Eth0/0/11'], ['b42e-99e6-3c49', '15', 'Eth0/0/5'], ['e062-9087-a15a', '34', 'Eth0/0/11'], ['4419-b649-83af', '34', 'Eth0/0/11'], ['00e0-4f03-2e24', '34', 'Eth0/0/11'], ['6045-cb7f-c902', '34', 'Eth0/0/11'], ['e247-1f2c-0f6d', '34', 'Eth0/0/11'], ['b42e-999d-1f99', '15', 'Eth0/0/5'], ['8469-9386-4585', '34', 'Eth0/0/11'], ['2cea-7feb-b118', '100', 'Eth0/0/20'], ['e062-9082-2258', '34', 'Eth0/0/11'], ['408d-5c1d-9e3e', '20', 'Eth0/0/9'], ['4cbd-8f90-71a7', '88', 'Eth0/0/11'], ['0c9d-92cc-8c94', '26', 'Eth0/0/16'], ['b42e-9968-3f8c', '34', 'Eth0/0/11'], ['4cbd-8f90-719c', '88', 'Eth0/0/11'], ['4cbd-8f90-7198', '88', 'Eth0/0/11'], ['4cbd-8fba-d022', '34', 'Eth0/0/11'], ['b42e-9944-2e6e', '34', 'Eth0/0/11'], ['b42e-9979-de61', '17', 'Eth0/0/7'], ['309c-23b9-101a', '20', 'Eth0/0/9'], ['4cbd-8fba-d012', '34', 'Eth0/0/11'], ['e0d5-5efc-0d5f', '26', 'Eth0/0/15'], ['309c-2365-209e', '20', 'Eth0/0/9'], ['4cbd-8fcc-9024', '34', 'Eth0/0/11'], ['e0d5-5e6d-bd23', '34', 'Eth0/0/11'], ['4cbd-8fcc-90b6', '26', 'Eth0/0/13'], ['4cf5-dc9a-c39e', '20', 'Eth0/0/9'], ['4cbd-8fcc-90b8', '34', 'Eth0/0/11'], ['c06d-ed2c-d964', '34', 'Eth0/0/11'], ['4cf5-dc97-3471', '20', 'Eth0/0/9'], ['f4b5-2018-50e7', '100', 'Eth0/0/24'], ['4cf5-dc97-344e', '26', 'Eth0/0/15'], ['e062-90eb-0492', '34', 'Eth0/0/11'], ['4cf5-dc97-343e', '26', 'Eth0/0/15'], ['4cf5-dc97-3421', '17', 'Eth0/0/7'], ['4419-b649-8619', '34', 'Eth0/0/11'], ['4419-b649-8609', '34', 'Eth0/0/11'], ['e0d5-5e51-ea27', '34', 'Eth0/0/11'], ['b42e-9971-29cd', '26', 'Eth0/0/16'], ['4419-b649-86fc', '34', 'Eth0/0/11'], ['4419-b649-86fd', '34', 'Eth0/0/11'], ['f000-003f-64a8', '34', 'Eth0/0/11'], ['f000-003f-64aa', '34', 'Eth0/0/11'], ['e40c-fdb5-8d5f', '20', 'Eth0/0/9'], ['f4b5-2024-f19b', '34', 'Eth0/0/11'], ['e0d5-5efa-1b79', '100', 'Eth0/0/24'], ['f000-006c-4574', '34', 'Eth0/0/11'], ['5475-959c-548b', '34', 'Eth0/0/11'], ['4419-b649-8716', '34', 'Eth0/0/11'], ['4419-b649-8717', '34', 'Eth0/0/11'], ['4419-b649-8714', '34', 'Eth0/0/11'], ['4419-b649-8718', '34', 'Eth0/0/11'], ['4419-b649-871c', '34', 'Eth0/0/11'], ['4419-b649-8706', '34', 'Eth0/0/11'], ['4419-b649-8705', '34', 'Eth0/0/11'], ['4419-b649-870a', '34', 'Eth0/0/11'], ['4419-b649-8709', '34', 'Eth0/0/11'], ['4419-b649-870f', '34', 'Eth0/0/11'], ['4419-b649-87f4', '34', 'Eth0/0/11'], ['4419-b649-87da', '34', 'Eth0/0/11'], ['4419-b641-7795', '11', 'Eth0/0/1'], ['4cf5-dc97-35a9', '17', 'Eth0/0/11'], ['4cf5-dc97-3677', '17', 'Eth0/0/7'], ['e062-90f6-66b9', '34', 'Eth0/0/11'], ['4cf5-dc97-366e', '26', 'Eth0/0/15'], ['acb9-2f46-05f5', '17', 'Eth0/0/7'], ['4cbd-8f2c-9597', '34', 'Eth0/0/11'], ['0c82-6858-7222', '200', 'GE0/0/3'], ['f000-006c-6648', '26', 'Eth0/0/15'], ['d258-42b8-7696', '20', 'Eth0/0/9'], ['b83a-080e-f650', '20', 'Eth0/0/9'], ['2cea-7fed-051c', '100', 'Eth0/0/24'], ['849a-4059-b273', '17', 'Eth0/0/7'], ['44a6-42b6-c0a3', '17', 'Eth0/0/7'], ['f000-003f-669d', '26', 'Eth0/0/15'], ['0017-6112-279e', '34', 'Eth0/0/11'], ['0017-6112-27a1', '26', 'Eth0/0/13'], ['4cbd-8f2c-9572', '34', 'Eth0/0/11'], ['4cf5-dc97-36b4', '17', 'Eth0/0/7'], ['408d-5c8f-2aca', '15', 'Eth0/0/5'], ['4cbd-8f2c-957c', '34', 'Eth0/0/11'], ['a85e-45a0-0b0e', '34', 'Eth0/0/11'], ['4cf5-dc97-3695', '17', 'Eth0/0/11'], ['4419-b649-8498', '34', 'Eth0/0/11'], ['0020-6ba3-4d7c', '20', 'Eth0/0/9'], ['f000-003f-669c', '87', 'Eth0/0/11'], ['4419-b649-8575', '34', 'Eth0/0/11'], ['a85e-45a0-0ace', '20', 'Eth0/0/9'], ['e0d5-5ec3-191d', '34', 'Eth0/0/11'], ['c051-7ea4-099f', '34', 'Eth0/0/11'], ['0800-2740-3822', '11', 'Eth0/0/1'], ['a85e-455a-5a7c', '17', 'Eth0/0/7'], ['2428-fddc-be9d', '26', 'Eth0/0/13'], ['e062-90c9-1712', '34', 'Eth0/0/11'], ['f000-006c-67ee', '34', 'Eth0/0/11'], ['4419-b649-85b6', '34', 'Eth0/0/11'], ['d45d-6439-a7a3', '20', 'Eth0/0/9'], ['f4b5-2024-f365', '34', 'Eth0/0/11'], ['b42e-997a-2570', '34', 'Eth0/0/11'], ['4ced-fb6c-ef9f', '15', 'Eth0/0/5'], ['e86a-642e-0446', '20', 'Eth0/0/9'], ['0017-6112-a93b', '34', 'Eth0/0/11'], ['b42e-997a-2550', '34', 'Eth0/0/11'], ['f000-003b-485d', '34', 'Eth0/0/11'], ['f000-003b-4854', '34', 'Eth0/0/11'], ['4cbd-8fd5-db1e', '34', 'Eth0/0/11'], ['f46d-2fcf-c3ed', '20', 'Eth0/0/9'], ['4cbd-8f79-1b84', '34', 'Eth0/0/11'], ['f000-003b-487f', '34', 'Eth0/0/11'], ['4cbd-8f79-1b80', '34', 'Eth0/0/11'], ['f000-006c-6811', '26', 'Eth0/0/15'], ['6461-4046-fc4d', '26', 'Eth0/0/13'], ['f000-003f-589e', '34', 'Eth0/0/11'], ['f000-003b-489a', '34', 'Eth0/0/11'], ['74d4-356d-891e', '34', 'Eth0/0/11'], ['4cbd-8f79-1b76', '34', 'Eth0/0/11'], ['4cbd-8f79-1b7a', '34', 'Eth0/0/11'], ['4cbd-8fd5-dbd4', '34', 'Eth0/0/11'], ['e062-90dd-0803', '34', 'Eth0/0/11'], ['4cb0-0810-6c1e', '26', 'Eth0/0/13'], ['8ca6-df43-6b43', '15', 'Eth0/0/5'], ['40b0-765f-6e47', '26', 'Eth0/0/16'], ['4cbd-8f79-1b53', '34', 'Eth0/0/11'], ['f000-003b-48a1', '34', 'Eth0/0/11'], ['4cbd-8f79-1b2a', '34', 'Eth0/0/11'], ['f000-003f-58bf', '87', 'Eth0/0/11'], ['fcaa-1470-f02e', '26', 'Eth0/0/16'], ['0c9d-920f-c668', '20', 'Eth0/0/11'], ['4cbd-8fd5-da71', '26', 'Eth0/0/13'], ['f000-003b-4931', '26', 'Eth0/0/15'], ['e062-9032-a966', '34', 'Eth0/0/11'], ['4cbd-8fd5-da6e', '34', 'Eth0/0/11'], ['f000-003b-4935', '34', 'Eth0/0/11'], ['4cbd-8fd5-da70', '34', 'Eth0/0/11'], ['5cde-34f7-014d', '34', 'Eth0/0/11'], ['8220-c9c9-82b6', '20', 'Eth0/0/9'], ['e062-90bb-c9b5', '34', 'Eth0/0/11'], ['f000-003b-494a', '34', 'Eth0/0/11'], ['e062-908d-9995', '34', 'Eth0/0/11'], ['8269-c0e2-cbe1', '14', 'Eth0/0/11'], ['e062-902f-e906', '34', 'Eth0/0/11'], ['081f-7130-405c', '26', 'Eth0/0/13'], ['0030-1bba-02db', '34', 'Eth0/0/11'], ['fcaa-140d-3103', '34', 'Eth0/0/11'], ['f079-596c-908a', '20', 'Eth0/0/9'], ['8811-96af-173e', '20', 'Eth0/0/9'], ['081f-7150-30de', '34', 'Eth0/0/11'], ['f4ee-0823-956a', '100', 'Eth0/0/24'], ['4cbd-8fd5-da85', '34', 'Eth0/0/11'], ['b42e-99ea-043c', '34', 'Eth0/0/11'], ['4cbd-8fd5-da95', '34', 'Eth0/0/11'], ['4cbd-8fd3-2aa9', '34', 'Eth0/0/11'], ['4cbd-8fd5-dab2', '34', 'Eth0/0/11'], ['4cbd-8fd5-dab0', '34', 'Eth0/0/11'], ['8ca6-dfc4-490d', '100', 'Eth0/0/24'], ['4cbd-8f79-19ca', '34', 'Eth0/0/11'], ['00e0-4f03-c582', '34', 'Eth0/0/11'], ['4cbd-8f79-19ac', '34', 'Eth0/0/11'], ['686d-bcf6-0e91', '88', 'Eth0/0/11'], ['5850-ed6d-2f7b', '34', 'Eth0/0/11'], ['0017-6112-ab50', '34', 'Eth0/0/11'], ['f000-006b-da3e', '34', 'Eth0/0/11'], ['f4b5-203b-1eec', '26', 'Eth0/0/16'], ['5850-ed6d-2f60', '34', 'Eth0/0/11'], ['e062-90bb-da7a', '34', 'Eth0/0/11'], ['4cbd-8f79-1968', '34', 'Eth0/0/11'], ['2428-fdc1-7333', '26', 'Eth0/0/13'], ['807c-6202-b8a1', '26', 'Eth0/0/13'], ['7405-a563-fba3', '34', 'Eth0/0/11'], ['f4b5-203b-1e44', '34', 'Eth0/0/11'], ['8ce7-486e-bf80', '87', 'Eth0/0/11'], ['728a-a3ba-da4f', '20', 'Eth0/0/9'], ['408d-5cfd-e739', '34', 'Eth0/0/11'], ['e062-90b0-4b6a', '34', 'Eth0/0/11'], ['fcaa-1422-a331', '34', 'Eth0/0/11'], ['0840-f360-a0d8', '34', 'Eth0/0/11'], ['f4b5-2024-ef6b', '26', 'Eth0/0/16'], ['0017-6111-1ad0', '34', 'Eth0/0/11'], ['4ced-fb41-fba5', '15', 'Eth0/0/5'], ['00e0-4c3c-a0db', '26', 'Eth0/0/16'], ['7486-e218-0a99', '34', 'Eth0/0/11'], ['7486-e218-1afe', '34', 'Eth0/0/11'], ['e0d5-5efc-0288', '34', 'Eth0/0/11'], ['4ced-fb41-fb44', '34', 'Eth0/0/11'], ['807c-62bb-4e1e', '20', 'Eth0/0/9'], ['408d-5ce7-408c', '26', 'Eth0/0/16'], ['e062-908a-bdc9', '34', 'Eth0/0/11'], ['1012-fb7a-2656', '26', 'Eth0/0/13'], ['94d9-b36c-2a90', '26', 'Eth0/0/16'], ['00e0-4c57-9160', '20', 'Eth0/0/9'], ['b42e-9968-4090', '11', 'Eth0/0/1'], ['24cf-24a4-2da8', '34', 'Eth0/0/11'], ['00e0-4c85-826d', '34', 'Eth0/0/11'], ['70b5-e874-56e5', '26', 'Eth0/0/16'], ['4cbd-8f90-6d54', '26', 'Eth0/0/13'], ['00e0-4d95-1326', '34', 'Eth0/0/11'], ['f000-003a-beb3', '34', 'Eth0/0/11'], ['f000-003a-beab', '34', 'Eth0/0/11'], ['f000-003a-beaf', '34', 'Eth0/0/11'], ['9ca6-15d8-f7a2', '100', 'Eth0/0/24'], ['00e0-7070-de71', '34', 'Eth0/0/11'], ['000c-294d-77f6', '100', 'Eth0/0/24'], ['f000-003a-bec0', '34', 'Eth0/0/11'], ['f000-003a-bec5', '34', 'Eth0/0/11'], ['8630-12f1-da35', '20', 'Eth0/0/9'], ['f000-003a-bee5', '34', 'Eth0/0/11'], ['b42e-991d-4210', '34', 'Eth0/0/11'], ['2428-fdc1-76a4', '88', 'Eth0/0/11'], ['2428-fdc1-76e4', '20', 'Eth0/0/9'], ['2428-fdc1-76d0', '34', 'Eth0/0/11'], ['f4b5-2024-ebaf', '34', 'Eth0/0/11'], ['2428-fdc1-76c7', '26', 'Eth0/0/13'], ['2428-fdc1-76cc', '26', 'Eth0/0/13'], ['2428-fdc1-7699', '26', 'Eth0/0/15'], ['2428-fdc1-7698', '26', 'Eth0/0/13'], ['b42e-99e6-329b', '34', 'Eth0/0/11'], ['00e0-4c52-032d', '17', 'Eth0/0/7'], ['309c-237d-6c73', '34', 'Eth0/0/11'], ['accb-51de-42e4', '26', 'Eth0/0/15'], ['70b5-e874-5732', '15', 'Eth0/0/5']]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "output = '''\n",
    " display mac-address\n",
    "MAC address table of slot 0:\n",
    "-------------------------------------------------------------------------------\n",
    "MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  \n",
    "               VSI/SI                                              MAC-Tunnel  \n",
    "-------------------------------------------------------------------------------\n",
    "00e0-4c37-ace4 34          -      -      Eth0/0/11       dynamic   -           \n",
    "00e0-4cff-2c14 34          -      -      Eth0/0/11       dynamic   -           \n",
    "c85b-7669-9e16 20          -      -      Eth0/0/9        dynamic   -           \n",
    "7427-eae8-fef9 15          -      -      Eth0/0/5        dynamic   -           \n",
    "acb9-2f24-2384 88          -      -      Eth0/0/1        dynamic   -           \n",
    "e0d5-5e56-7edb 17          -      -      Eth0/0/7        dynamic   -           \n",
    "5cde-3414-a887 26          -      -      Eth0/0/13       dynamic   -           \n",
    "f4b5-203b-2404 26          -      -      Eth0/0/16       dynamic   -           \n",
    "70b5-e874-5844 34          -      -      Eth0/0/11       dynamic   -           \n",
    "'''\n",
    "\n",
    "f = open('display-mac.template')\n",
    "template = TextFSM(f)\n",
    "outTab = template.ParseText(tabStr)\n",
    "print (outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "20902fdb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "235"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 317,
   "id": "a5ac3ac7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 317,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "out = tn.read_very_eager().decode('ascii')#读取缓冲区内的数据不等待\n",
    "out"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7e9cbb9f",
   "metadata": {},
   "source": [
    "### 关闭连接\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "89f800a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "tn.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c2f89d68",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "13e66494",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8c1c994",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d309411d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "65f3e6cb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[\n",
      "    [\n",
      "        \"00e0-4c37-ace4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5ef7-0e13\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4cff-2c14\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"7427-eae8-fef9\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"acb9-2f24-2384\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e56-7edb\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"5cde-3414-a887\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-2404\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-5844\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9904-6dda\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f44c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-8155\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-8167\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99e6-3c49\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9087-a15a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-83af\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4f03-2e24\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"6045-cb7f-c902\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e247-1f2c-0f6d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-999d-1f99\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"8469-9386-4585\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2cea-7feb-b118\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/20\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9082-2258\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5c1d-9e3e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-71a7\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c9d-92cc-8c94\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9968-3f8c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-719c\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-7198\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fba-d022\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9944-2e6e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9979-de61\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-23b9-101a\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fba-d012\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efc-0d5f\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-2365-209e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-9024\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e6d-bd23\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-90b6\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc9a-c39e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-90b8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"c06d-ed2c-d964\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3471\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2018-50e7\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-344e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90eb-0492\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-343e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3421\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8619\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8609\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e51-ea27\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9971-29cd\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-86fc\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-86fd\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-64a8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-64aa\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e40c-fdb5-8d5f\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f19b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efa-1b79\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-4574\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5475-959c-548b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8716\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8717\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8714\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8718\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-871c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8706\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8705\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-870a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8709\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-870f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-87f4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-87da\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b641-7795\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-35a9\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3677\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90f6-66b9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-366e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"acb9-2f46-05f5\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-9597\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c82-6858-7222\",\n",
      "        \"200\",\n",
      "        \"GE0/0/3\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-6648\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"d258-42b8-7696\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"b83a-080e-f650\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"2cea-7fed-051c\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"849a-4059-b273\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"44a6-42b6-c0a3\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-669d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-279e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-27a1\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-9572\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-36b4\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5c8f-2aca\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-957c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-45a0-0b0e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3695\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8498\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0020-6ba3-4d7c\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-669c\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8575\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-45a0-0ace\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5ec3-191d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"c051-7ea4-099f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0800-2740-3822\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-455a-5a7c\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fddc-be9d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90c9-1712\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-67ee\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-85b6\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"d45d-6439-a7a3\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f365\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-997a-2570\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb6c-ef9f\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"e86a-642e-0446\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-a93b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-997a-2550\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-485d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4854\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-db1e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f46d-2fcf-c3ed\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b84\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-487f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b80\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-6811\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"6461-4046-fc4d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-589e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-489a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"74d4-356d-891e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b76\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b7a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dbd4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90dd-0803\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cb0-0810-6c1e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ca6-df43-6b43\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"40b0-765f-6e47\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b53\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-48a1\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b2a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-58bf\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-1470-f02e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c9d-920f-c668\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da71\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4931\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9032-a966\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da6e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4935\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da70\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5cde-34f7-014d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8220-c9c9-82b6\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90bb-c9b5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-494a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-908d-9995\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8269-c0e2-cbe1\",\n",
      "        \"14\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-902f-e906\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"081f-7130-405c\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"0030-1bba-02db\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-140d-3103\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f079-596c-908a\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"8811-96af-173e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"081f-7150-30de\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4ee-0823-956a\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da85\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99ea-043c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da95\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd3-2aa9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dab2\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dab0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ca6-dfc4-490d\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-19ca\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4f03-c582\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-19ac\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"686d-bcf6-0e91\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5850-ed6d-2f7b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-ab50\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006b-da3e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-1eec\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"5850-ed6d-2f60\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90bb-da7a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1968\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7333\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"807c-6202-b8a1\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"7405-a563-fba3\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-1e44\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ce7-486e-bf80\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"728a-a3ba-da4f\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5cfd-e739\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90b0-4b6a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-1422-a331\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0840-f360-a0d8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-ef6b\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6111-1ad0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb41-fba5\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c3c-a0db\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"7486-e218-0a99\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"7486-e218-1afe\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efc-0288\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb41-fb44\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"807c-62bb-4e1e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5ce7-408c\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-908a-bdc9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"1012-fb7a-2656\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"94d9-b36c-2a90\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c57-9160\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9968-4090\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"24cf-24a4-2da8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c85-826d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-56e5\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-6d54\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4d95-1326\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beb3\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beab\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beaf\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"9ca6-15d8-f7a2\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-7070-de71\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"000c-294d-77f6\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bec0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bec5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8630-12f1-da35\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bee5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-991d-4210\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76a4\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76e4\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76d0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-ebaf\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76c7\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76cc\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7699\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7698\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99e6-329b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c52-032d\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-237d-6c73\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"accb-51de-42e4\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-5732\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ]\n",
      "]\n"
     ]
    }
   ],
   "source": [
    "tmp = json.dumps(outTab, sort_keys=True, indent=4, separators=(',', ': '))\n",
    "print(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "ef4a8230",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "int('100')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "e44452fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'mac': '00e0-4c37-ace4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5ef7-0e13', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '00e0-4cff-2c14', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '7427-eae8-fef9', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'acb9-2f24-2384', 'vlan': '88', 'port': 'Eth0/0/1'}\n",
      "{'mac': 'e0d5-5e56-7edb', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '5cde-3414-a887', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f4b5-203b-2404', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '70b5-e874-5844', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9904-6dda', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-f44c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-8155', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-8167', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-99e6-3c49', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'e062-9087-a15a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-83af', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4f03-2e24', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '6045-cb7f-c902', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e247-1f2c-0f6d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-999d-1f99', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '8469-9386-4585', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2cea-7feb-b118', 'vlan': '100', 'port': 'Eth0/0/20'}\n",
      "{'mac': 'e062-9082-2258', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '408d-5c1d-9e3e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8f90-71a7', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0c9d-92cc-8c94', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': 'b42e-9968-3f8c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f90-719c', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f90-7198', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fba-d022', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9944-2e6e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9979-de61', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '309c-23b9-101a', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fba-d012', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efc-0d5f', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '309c-2365-209e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fcc-9024', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5e6d-bd23', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fcc-90b6', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '4cf5-dc9a-c39e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fcc-90b8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'c06d-ed2c-d964', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3471', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2018-50e7', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cf5-dc97-344e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'e062-90eb-0492', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-343e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '4cf5-dc97-3421', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '4419-b649-8619', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8609', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5e51-ea27', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9971-29cd', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4419-b649-86fc', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-86fd', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-64a8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-64aa', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e40c-fdb5-8d5f', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2024-f19b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efa-1b79', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': 'f000-006c-4574', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5475-959c-548b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8716', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8717', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8714', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8718', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-871c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8706', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8705', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-870a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8709', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-870f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-87f4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-87da', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b641-7795', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': '4cf5-dc97-35a9', 'vlan': '17', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3677', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': 'e062-90f6-66b9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-366e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'acb9-2f46-05f5', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '4cbd-8f2c-9597', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0c82-6858-7222', 'vlan': '200', 'port': 'GE0/0/3'}\n",
      "{'mac': 'f000-006c-6648', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'd258-42b8-7696', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'b83a-080e-f650', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '2cea-7fed-051c', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '849a-4059-b273', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '44a6-42b6-c0a3', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': 'f000-003f-669d', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '0017-6112-279e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0017-6112-27a1', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '4cbd-8f2c-9572', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-36b4', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '408d-5c8f-2aca', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '4cbd-8f2c-957c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'a85e-45a0-0b0e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3695', 'vlan': '17', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8498', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0020-6ba3-4d7c', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f000-003f-669c', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8575', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'a85e-45a0-0ace', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'e0d5-5ec3-191d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'c051-7ea4-099f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0800-2740-3822', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': 'a85e-455a-5a7c', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '2428-fddc-be9d', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'e062-90c9-1712', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-67ee', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-85b6', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'd45d-6439-a7a3', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2024-f365', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-997a-2570', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb6c-ef9f', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'e86a-642e-0446', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '0017-6112-a93b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-997a-2550', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-485d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-4854', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-db1e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f46d-2fcf-c3ed', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8f79-1b84', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-487f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b80', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-6811', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '6461-4046-fc4d', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f000-003f-589e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-489a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '74d4-356d-891e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b76', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b7a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dbd4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90dd-0803', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cb0-0810-6c1e', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '8ca6-df43-6b43', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '40b0-765f-6e47', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4cbd-8f79-1b53', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-48a1', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b2a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-58bf', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-1470-f02e', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '0c9d-920f-c668', 'vlan': '20', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da71', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f000-003b-4931', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'e062-9032-a966', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da6e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-4935', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da70', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5cde-34f7-014d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8220-c9c9-82b6', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'e062-90bb-c9b5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-494a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-908d-9995', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8269-c0e2-cbe1', 'vlan': '14', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-902f-e906', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '081f-7130-405c', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '0030-1bba-02db', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-140d-3103', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f079-596c-908a', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '8811-96af-173e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '081f-7150-30de', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4ee-0823-956a', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cbd-8fd5-da85', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-99ea-043c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da95', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd3-2aa9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dab2', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dab0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8ca6-dfc4-490d', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cbd-8f79-19ca', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4f03-c582', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-19ac', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '686d-bcf6-0e91', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5850-ed6d-2f7b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0017-6112-ab50', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006b-da3e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-203b-1eec', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '5850-ed6d-2f60', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90bb-da7a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1968', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-7333', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '807c-6202-b8a1', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '7405-a563-fba3', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-203b-1e44', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8ce7-486e-bf80', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': '728a-a3ba-da4f', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '408d-5cfd-e739', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90b0-4b6a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-1422-a331', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0840-f360-a0d8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-ef6b', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '0017-6111-1ad0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb41-fba5', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '00e0-4c3c-a0db', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '7486-e218-0a99', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '7486-e218-1afe', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efc-0288', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb41-fb44', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '807c-62bb-4e1e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '408d-5ce7-408c', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': 'e062-908a-bdc9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '1012-fb7a-2656', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '94d9-b36c-2a90', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '00e0-4c57-9160', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'b42e-9968-4090', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': '24cf-24a4-2da8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4c85-826d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '70b5-e874-56e5', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4cbd-8f90-6d54', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '00e0-4d95-1326', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beb3', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beab', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beaf', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '9ca6-15d8-f7a2', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '00e0-7070-de71', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '000c-294d-77f6', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': 'f000-003a-bec0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-bec5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8630-12f1-da35', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f000-003a-bee5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-991d-4210', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76a4', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76e4', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '2428-fdc1-76d0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-ebaf', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76c7', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '2428-fdc1-76cc', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '2428-fdc1-7699', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '2428-fdc1-7698', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'b42e-99e6-329b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4c52-032d', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '309c-237d-6c73', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'accb-51de-42e4', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '70b5-e874-5732', 'vlan': '15', 'port': 'Eth0/0/5'}\n"
     ]
    }
   ],
   "source": [
    "for row in outTab:\n",
    "\n",
    "\n",
    "    keys = ['mac', 'vlan', 'port']\n",
    "\n",
    "    dictionary = dict(zip(keys, row))\n",
    "    print(dictionary)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93d4d273",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
